// 首页
// http://m.qlm16888.com

// 登录
// http://m.qlm16888.com/login

// 接单
// http://m.qlm16888.com/app/buyer/tasks/has_order



let token = Android.getMap("token")
document.cookie = token



function getParameterHandler() {
    let headers = {
        "cookie": parameter.getMap("token")
    }
    let body = {}
    let strUrl = ``
    let url = parameter.getMap("url") + strUrl
    return {
        mediaType: "json",
        requestType: "POST",
        url: url,
        headers: JSON.stringify(headers),
        body: JSON.stringify(body)
    }
}
getParameterHandler()




function getResponse() {
    let res = response.getMap("res")
    let code = "500"
    let message = "接单中"
    let dataKey = ""
    let dataValue = ""

    if (res == 1) {
        code = "200"
        message = "已经接到订单，请及时操作"
    } else if (res == 0) {
        code = "500"
        message = "接单中"
    }else{
        code = "300"
        message = "登录失败"
    }

    return {
        code: code,
        message: message,
        dataKey: dataKey,
        dataValue: dataValue
    }
}
getResponse()


// if (return_data == 1) {
//     window.check_has_order = true;
//     // alert('已接到订单，请及时操作');
//     layer.msg("已经接到订单，请及时操作", {time: 5000})
//     // window.location.href = "http:\/\/vip.wl819924553.com\/app\/buyer\/orders\/index_";
// }